import Vue from 'vue';
import vueRouter from 'vue-router';
import App from './App.vue';
import Mint from 'mint-ui';
import 'mint-ui/lib/style.min.css';
Vue.use(Mint);
Vue.use(vueRouter);
import home from './component/home/home.vue';
import shopcar from './component/shopcar/car.vue';
import '../mui/dist/css/mui.css';
import '../statics/css/site.css';
import vueResource from 'vue-resource';
import newslist from './component/news/newslist.vue';
import newsinfo from './component/news/newsinfo.vue';
Vue.use(vueResource);
var router = new vueRouter({
    linkActiveClass:'mui-active',
    routes:[
        //当服务器启动时自动重定向到/home页面
        {path:'/',redirect:'/home'},
        {path:'/home',component:home},
        {path:'/shopcar',component:shopcar},
        {path:'/news/newslist',component:newslist},
        {path:'/news/newsinfo/:id',component:newsinfo}
    ]
});

new Vue({
    el: '#app',
    router,
    render:c=>c(App)
});

